package pe.edu.sistemas.postgrado.samupg.repository.dao.implHib;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;
import pe.edu.sistemas.postgrado.samupg.domain.model.Comentario;
import pe.edu.sistemas.postgrado.samupg.repository.dao.ComentarioDAO;

/**
 *
 * @author Marlon
 */
@Repository
public class ComentarioDAOImpl implements ComentarioDAO {

    @Autowired
    private SessionFactory sessionFactory;

    @Override
    public void crearComentario(Comentario comentario) throws DataAccessException {
        sessionFactory.getCurrentSession().save(comentario);
    }
}
